# 运算法则：+-*/
# print(1+2-3)
# print(1+2*3)
# print(1+2/3)

# #
# avg = 3+4-5+8*8
# total = (70-avg) ** 3
# print(total)


# #修改不同变量的值
# a = 10
# b = a
# # b = 10
# print(b)
#
# a = 20
# # a = 20
# print(a)
# # b = 10
# print(b)

# # 打印类型<class 'int'>
# a = 10
# print(type(a))


# # 字符串
# # 法1：
# b = "123456"
# print("b = "+b)
# # 法2：
# a = '123456 "asda"'
# print("a = "+a)
# # 错误用法：print("a.type = "+type(a))
# print("a.type = "+str(type(a)))
# c = "asf'123'"
# print("c = "+c)
# # 法3：
# d = ''' My name is "djx",'d' of "djx" is "董" '''
# print("d = "+d)


# # 长度
# a = '12345'
# print("a = " + a)
# print(len(a))
# #----------------------
# # 空格也算一个字符
# a = 'hhh ,,, ---'
# print("a = " + a)
# print(len(a))


# # 字符串拼接
# a = "123"
# b = "456"
# print(a + b)
# # ------------------------
# # 暂时未报错，但是运行之后会报错：TypeError: can only concatenate str (not "int") to str
# a = "123"
# b = 123
# print(a + b)

# # 定义变量
# a: int  = 10

# # 不同的打印方式
# print("asd")
# print('asd')
# print('''asd''')

# # 格式化
# a = 10
# print(f"a = {a}")   # a = 10

# # 请在控制台输入一个整数
# num = input('请在控制台输入一个整数')  # 123、、
# print(f'您输入的数字为：{num}')       # 123、、


# # 请在控制台输入两个整数，并相加
# a = input('请在控制台输入一个整数:')
# b = input('请在控制台输入一个整数:')
# print(type(a))    # <class 'str'>
# # 将字符串转化为整型
# a = int(a)
# b = int(b)
#
# print(f'您输入的数字和为：{a + b}')


# # 把字符串转为浮点型
# a = input('请在控制台输入一个浮点型:')
# a = float(a)
# print(f'output为：{a}')


# 运算中0不能作为除数




# # 比较 数字大小
# a = 10
# b = 20
# print(a<b)
# print(a>b)
# print(a<=b)
# print(a>=b)

# # 比较 字符串大小
# a = "hello"
# b = "helo"
# print(a<b)
# print(a>b)
# print(a<=b)
# print(a>=b)
# print(a==b)
# print(a!=b)

# # 等价与1
# a = 10
# b = 20 ; c = 30
# # ------------
# a,b,c = 10,20,30
#
# # 等价与2
# print(a<b and b<c)
# # --------------
# print(a<b<c)




# # 交换数据
# a,b = b,a


# # Python中没有自增自减
# a = 10
# ++a
# print(a)  #  a = 10
# # a++       #  报错
# a += 1     # 自增
# print(a)  #  a = 11

# 相加
# a = 10
# b = '123'
# #print(a+b)  #  TypeError: unsupported operand type(s) for +: 'int' and 'str'
#--------------------------------------------
# a = 10
# b = True
# print(a+b)  #  10
#---------------------------------------------
# a = 10
# b = 1.11
# print(a+b)    #  11.11
#---------------------------------------------
# a = 'aaa'
# b = '123'
# print(a+b)      #  aaa123


# # if
# a = 1
# if a == 1:
#     print('a = 1')
#     print('print?1')   #满足条件时,这里也走
# print('print?2')  #  不满足条件,走这里



